package com.kgc.kmall.kmallcloudmanagerweb.service;


import com.kgc.kmall.bean.PmsBaseCatalog1;
import com.kgc.kmall.bean.PmsBaseCatalog2;
import com.kgc.kmall.bean.PmsBaseCatalog3;
import com.kgc.kmall.kmallcloudmanagerweb.hystix.CataFeignHystix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(value = "KMALLCLOUD-MANAGER-SERVICE",fallback = CataFeignHystix.class)
public interface CataFeignService {
    @RequestMapping("/getCatalog1")
    public List<PmsBaseCatalog1> getCata1();
    @RequestMapping("/getCatalog2/{catalog1Id}")
    public List<PmsBaseCatalog2> getCata2(@PathVariable(value = "catalog1Id") Integer catalog1Id);
    @RequestMapping("/getCatalog3/{catalog2Id}")
    public List<PmsBaseCatalog3> getCata3(@PathVariable(value = "catalog2Id") Integer catalog2Id);
}
